Skip to content

Remove the repository-layout example - #207

Merged
mikemaccana merged 1 commit into
mainfrom
claude/jolly-carson-szdntp
Nov 5, 2026
Merged

mikemaccana merged 1 commit into
mainfrom
claude/jolly-carson-szdntp

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Why

basics/repository-layout showed how to split a program across files. None of the frameworks this repo targets need it any more:

  • Anchor v1 and v2: since Anchor 1.0, anchor init defaults to the Multiple template (cli/src/rust_template.rs; 0.29–0.32 defaulted to Single). It writes lib.rs, constants.rs, error.rs, instructions.rs + instructions/initialize.rs, and state.rs, so every new Anchor project already has this layout.
  • Quasar: quasar init writes a single lib.rs, but 34 of the 56 Quasar programs in this repo already use the lib.rs / error.rs / state.rs / instructions/ layout (escrow, counter, lending and every other finance example), so readers see it without a dedicated example.
  • Pinocchio and native are rarely used directly, which isn't reason enough to keep the example.

Changes

  • Delete basics/repository-layout/ (all five variants).
  • Remove its README catalogue entry, its three workspace members in Cargo.toml, and its entry in scripts/generate-quasar-readmes.mjs.
  • Drop its name from a comment in basics/cross-program-invocation/quasar/hand.
  • Refresh Cargo.lock (this also removes borsh 0.9, which only the native copy used).

No other file in this repo refers to it, and neither does quicknode/solana-book or quicknode/solana-finance-claude-plugin.


Generated by Claude Code

Anchor 1.0 and later scaffold a multi-file program by default (`anchor
init` writes lib.rs, constants.rs, error.rs, instructions.rs with an
instructions/ directory, and state.rs), so the Anchor v1 and v2 copies
teach what every new Anchor project already has. Quasar's starter is a
single lib.rs, but 34 of the 56 Quasar programs here already use the
lib.rs / error.rs / state.rs / instructions/ layout, escrow and counter
among them, so the Quasar copy adds nothing either. Pinocchio and native
alone do not justify keeping it.

Drops the directory, its README entry, its workspace members, its entry
in the Quasar README generator, and a mention in a comment in the CPI
example; refreshes Cargo.lock.

Claude-Session: https://claude.ai/code/session_01GZHin7uZN95tCycB2vWhog
@mikemaccana
mikemaccana merged commit 2af9965 into main Nov 5, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant